<?php   // $Id: article_new.php 188 2008-06-05 20:50:19Z pcoustillas $ ?>
<?php

require_once("include/verif.php");
require_once("include/config/common.php");
require_once("include/language/$lang.php");


$article=isset($_POST['article'])?$_POST['article']:"";
$uni=isset($_POST['uni'])?$_POST['uni']:"";
$prix=isset($_POST['prix'])?$_POST['prix']:"";
$taux_tva=isset($_POST['taux_tva'])?$_POST['taux_tva']:"";
$commentaire=isset($_POST['commentaire'])?$_POST['commentaire']:"";
$stock=isset($_POST['stock'])?$_POST['stock']:"";
$stomin=isset($_POST['stomin'])?$_POST['stomin']:"";
$stomax=isset($_POST['stomax'])?$_POST['stomax']:"";
$categorie=isset($_POST['categorie'])?$_POST['categorie']:"0";

if($article=='' || $prix=='' || $taux_tva=='' || $uni=='' )
{
	$message="$lang_oubli_champ";
	header("Location: article_lister.php?message=$message");
	exit;
}

$sql1 = "INSERT INTO ${tblpref}article(article, prix_htva, taux_tva, commentaire, uni, stock, stomin, stomax, cat) VALUES ('$article', '$prix', '$taux_tva', '$commentaire', '$uni', '$stock', '$stomin', '$stomax', '$categorie')";
mysql_query($sql1) or die('Erreur SQL article_new.php !<br/>'.$sql1.'<br/>'.mysql_error());
$message= "$lang_nouv_art";
header("Location: article_lister.php?message=$message");

?>




